import request from '@/utils/request'

// 创建文章
export const createArticle = (data) => {
  return request({
    url: '/api/v1/article/create',
    method: 'post',
    data
  })
}

// 更新文章
export const updateArticle = (data) => {
  return request({
    url: '/api/v1/article/update',
    method: 'post',
    data
  })
}

// 删除文章
export const deleteArticle = (params) => {
  return request({
    url: '/api/v1/article/delete',
    method: 'get',
    params
  })
}

// 查询单个文章
export const findOneArticle = (params) => {
  return request({
    url: '/api/v1/article/findOne',
    method: 'get',
    params
  })
}

// 查询所有文章
export const findAllArticle = (params) => {
  return request({
    url: '/api/v1/article/findAll',
    method: 'get',
    params
  })
}

